<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>操舱执行登记</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.2.0.css" />
    <style>
        ul li,
        ul li div div select,
        ul li div div input {
            font-size: 14px !important;
            ;
        }

        .aui-list-item-label {
            width: 220px !important;
            text-align: center;
        }

        .aui-list-item-input-small {
            width: 140px !important;
            position: relative;
        }

        .aui-list-item-input-small>input {
            width: 90px;
        }

        .aui-list-item-input-small>span {
            position: absolute;
            display: inline-block;
            height: 30px;
            top: 50%;
            right: 0;
            transform: translateY(-50%);
        }

        .aui-list-item-label-width {
            width: 530px !important;
        }

        .aui-list-item-input>label {
            margin-left: 10px;
        }

        .aui-radio {
            margin-right: 10px;
        }

        .aui-radio,
        .aui-checkbox {
            width: 25px !important;
            height: 25px !important;
            margin-right: 5px;
        }

        .textarea-container {
            width: 100%;
            margin: 0 auto;
        }

        .textarea-container>div:nth-child(1) {
            text-align: center;
            font-size: 17px;
        }

        input::-webkit-input-placeholder {
            /*Webkit browsers*/
            color: rgb(241, 11, 11);
            font-size: 16px;
        }

        input:-moz-placeholder {
            /*Mozilla Firefox 4 to 8*/
            color: rgb(241, 11, 11);
            font-size: 16px;
        }

        input::moz-placeholder {
            /*Mozilla Firefox 19+*/
            color: rgb(241, 11, 11);
            font-size: 16px;
        }

        input:-ms-input-placeholder {
            /*Internet Explorer 10+*/
            color: rgb(241, 11, 11);
            font-size: 16px;
        }

        .textarea-container>div:nth-child(2) {
            padding: 10px;
        }

        .textarea-wrapper {
            min-height: 100px;
            border: 1px solid rgba(0, 0, 0, 0.3);
            width: 97%;
            margin: 20px auto 5px auto;
            border-radius: 5px;
        }

        .submit-btn-bottom {
            font-size: 16px;
            margin: 30px auto;
            text-align: center;
        }

        .submit-btn-bottom>button {
            border: none;
            outline: none;
            background-color: #0064B0;
            height: 50px;
            width: 150px;
            color: #fff;
        }
    </style>
</head>

<body>
    <main id="app">
        <div v-if="ParameterIdentification === 1">
            <input type="hidden" id="HoldInformation_Id" value="0">
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                舱次编号
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" placeholder="舱室编号" id="F_cangcid">
                            </div>
                        </div>
                        <div class="aui-list-item-inner">

                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                压力
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" id="F_yali" placeholder="压力">
                            </div>
                        </div>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                舱室
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" id="F_CabinID" placeholder="舱室">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                加压时间
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" id="F_jiayaTime" placeholder="加压时间">
                            </div>
                        </div>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                稳压时间
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" id="F_wenyaTime" placeholder="稳压时间">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                减压时间
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" id="F_jianyaTime" placeholder="减压时间">
                            </div>
                        </div>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                出舱时间:
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" id="F_chucangTime" placeholder="稳压时间">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                开舱次数
                            </div>
                            <div class="aui-list-item-input">
                                <input type="number" id="F_kaicangshu" placeholder="开舱次数">
                            </div>
                        </div>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                进舱人数
                            </div>
                            <div class="aui-list-item-input">
                                <input type="number" id="F_rencount" placeholder="进舱次数">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                新病人数
                            </div>
                            <div class="aui-list-item-input">
                                <input type="number" id="F_newrencount" placeholder="新病人数">
                            </div>
                        </div>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                操舱方式
                            </div>
                            <div class="aui-list-item-input">
                                <select id="F_way">
                                    <option value="电脑">电脑</option>
                                    <option value="电子">电子</option>
                                    <option value="手动">手动</option>
                                </select>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                单独开舱
                            </div>
                            <div class="aui-list-item-input">
                                <select id="F_danduKaicang">
                                    <option value="0">否</option>
                                    <option value="1">是</option>
                                </select>
                            </div>
                        </div>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                舱内抢救
                            </div>
                            <div class="aui-list-item-input">
                                <select id="F_cangneiQiangjiu">
                                    <option value="0">否</option>
                                    <option value="1">是</option>
                                </select>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                吸氧方案1
                            </div>
                            <div class="aui-list-item-input">
                                <select id="F_xiyangfa1">
                                    <template v-for="(Dictionary, index) in DictionaryLibrary">
                                        <option :value="Dictionary.Dictionaries_ID">{{Dictionary.Dictionaries_Name}}
                                        </option>
                                    </template>

                                </select>
                            </div>
                        </div>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                吸氧方案2
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" id="F_xiyangfa2" placeholder="吸氧方案2">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                治疗总时程
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" id="F_shicheng" placeholder="治疗总时程"><span>min</span>
                            </div>
                        </div>
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                第一次吸氧末
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" id="F_xiyang1" placeholder="第一次吸氧末"><span>%</span>
                            </div>
                        </div>

                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                第二次吸氧末
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" id="F_xiyang2" placeholder="第二次吸氧末"><span>%</span>
                            </div>
                        </div>
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                第三次吸氧末
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" id="F_xiyang3" placeholder="第三次吸氧末"><span>%</span>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                减压末
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" id="F_jianyamo" placeholder="减压末"><span>%</span>
                            </div>
                        </div>
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                加压前
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" id="F_jiayawendu" placeholder="加压前"><span>°C</span>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                稳压始
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" id="F_wenyawendu" placeholder="稳压始"><span>°C</span>
                            </div>
                        </div>
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                减压始
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" id="F_jianyawendu" placeholder="减压始"><span>°C</span>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                减压末温度
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" id="F_jianmowendu" placeholder="减压末"><span>°C</span>
                            </div>
                        </div>
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                技师
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small"
                                v-for="(F_jsName, index) in SelectDay_InspectRecord" v-if="index==0">
                                <!-- <select id="F_jsName">
                                <template  v-for="(F_jsName, index) in Query_UserList"  v-if="F_jsName.Permissions_Name == '技师'">
                                  <option   :value="F_jsName.User_Name">{{F_jsName.User_Name}}</option>
                                </template>
                              </select> -->
                                <input id="F_jsName" :value="F_jsName.User_Name" disabled placeholder="技师">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                医师
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small"
                                v-for="(F_ysName, index) in SelectDay_DoctorCheck" v-if="index==0">
                                <!-- <select id="F_ysName">
                              <template  v-for="(F_ysName, index) in Query_UserList"  v-if="F_ysName.Permissions_Name == '医师'">
                                <option  :value="F_ysName.User_Name">{{F_ysName.User_Name}}</option>
                              </template>
                            </select> -->
                                <input id="F_ysName" :value="F_ysName.F_CabinStateName" disabled placeholder="医师">
                            </div>
                        </div>
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                护士
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <select id="F_hsName">
                                    <template v-for="(F_hsName, index) in Query_UserList"
                                        v-if="F_hsName.Permissions_Name == '护理'">
                                        <option :value="F_hsName.User_Name">{{F_hsName.User_Name}}</option>
                                    </template>
                                </select>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">

                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                操舱者1
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <select id="F_ccName1">
                                    <template v-for="(F_ccName1, index) in Query_UserList">
                                        <option :value="F_ccName1.User_Name">{{F_ccName1.User_Name}}</option>
                                    </template>
                                </select>
                            </div>
                        </div>
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                操舱者2
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <select id="F_ccName2">
                                    <template v-for="(F_ccName2, index) in Query_UserList">
                                        <option :value="F_ccName2.User_Name">{{F_ccName2.User_Name}}</option>
                                    </template>
                                </select>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-label-width">
                                开舱前设备巡查情况1111（技师）
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <label><input class="aui-radio" type="radio" value="xuncha1" name="xuncha" v-model="checked">是</label>
                              <label><input class="aui-radio" type="radio" value="xuncha2" name="xuncha" v-model="checked">否</label> -->
                                <input type="checkbox" class="aui-switch" id="F_shebeiCheck" checked
                                    name="F_shebeiCheck" v-model="checked">
                            </div>
                        </div>
                    </li>
                    <div v-if="checked">
                        <div class="aui-content aui-margin-b-15">
                            <ul class="aui-list aui-form-list">
                                <li class="aui-list-item">
                                    <div class="aui-list-item-inner">
                                        <div class="aui-list-item-input">
                                            <label>
                                                <input type="checkbox" class="aui-checkbox"
                                                    checked>应急呼叫、对讲系统情况良好</label>
                                        </div>
                                    </div>
                                </li>
                                <li class="aui-list-item">
                                    <div class="aui-list-item-inner">
                                        <div class="aui-list-item-input">
                                            <label>
                                                <input type="checkbox" class="aui-checkbox"
                                                    checked>巡视查看本舱次患者是否需处置</label>
                                        </div>
                                    </div>
                                </li>
                                <li class="aui-list-item">
                                    <div class="aui-list-item-inner">
                                        <div class="aui-list-item-input">
                                            <label>
                                                <input type="checkbox" class="aui-checkbox"
                                                    checked>检查是否携带酒精等易燃易爆物品</label>
                                        </div>
                                    </div>
                                </li>
                                <!-- <li class="aui-list-item">
                                    <div class="aui-list-item-inner">
                                        <div class="aui-list-item-input">
                                            <label>
                                    <input type="checkbox" class="aui-checkbox" checked>核查病人医嘱是否与本舱次压力时程一致</label>
                                        </div>
                                    </div>
                                </li> -->
                                <li class="aui-list-item">
                                    <div class="aui-list-item-inner">
                                        <div class="aui-list-item-input">
                                            <label>
                                                <input type="checkbox" class="aui-checkbox"
                                                    checked>检查是否携带打火机、手机、电动玩具等物品</label>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-label-width">
                                开舱前安全宣教（护士）
                            </div>
                            <div class="aui-list-item-input">
                                <label><input class="aui-radio" type="radio" value="1" name="F_xuanjiaoPaient"
                                        checked>是</label>
                                <label><input class="aui-radio" type="radio" value="0" name="F_xuanjiaoPaient">否</label>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-label-width">
                                开舱前巡诊交接患者（医师）
                            </div>
                            <div class="aui-list-item-input">
                                <label><input class="aui-radio" name="F_jiaojiePaient" type="radio" value="1"
                                        checked>是</label>
                                <label><input class="aui-radio" name="F_jiaojiePaient" type="radio" value="0">否</label>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-label aui-list-item-label-width">
                            提醒医师进行核查
                        </div>
                        <div class="aui-content-padded aui-list-item-input">
                            <div class="aui-btn aui-btn-info" onclick="Update_CabinInformation(1)">点击提醒</div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-label aui-list-item-label-width">
                            氧舱浓度标签上传
                        </div>
                        <div class="aui-content-padded aui-list-item-input">
                            <div class="aui-list-item-input" style="margin:15px;" onclick="showAction();">
                                <img src="../image/dianwo.jpg" id="avatar" name="avatar" width="150px;">
                                <input type="text" id="F_biaoqian_img" style="display:none">
                            </div>
                        </div>
                    </li>
                </ul>
                <div class="textarea-container">
                    <div>备注</div>
                    <div contenteditable="true" class="textarea-wrapper" id="F_beizhu">
                    </div>
                </div>
            </div>
            <div v-for="(F_jsName, index) in SelectDay_InspectRecord" v-if="index==0">
                <div class="submit-btn-bottom" v-for="(F_ysName, index1) in SelectDay_DoctorCheck" v-if="index==0">

                    <button v-if="F_jsName.User_Name != null && F_ysName.F_CabinStateName != null" id="Preservatio"
                        onclick="Add_OperatingRecord_Show()">保存</button>
                </div>
            </div>
        </div>

        <div v-else>
            <div class="aui-content aui-margin-b-15" v-for="(item, index) in OperatinRecord">
                <input type="hidden" id="HoldInformation_Id" :value="item.F_id">
                <ul class="aui-list aui-form-list">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                舱次编号
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" :value="item.F_cangcid" placeholder="舱室编号" id="F_cangcid">
                            </div>
                        </div>
                        <div class="aui-list-item-inner">

                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                压力
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" :value="item.F_yali" id="F_yali" placeholder="压力">
                            </div>
                        </div>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                舱室
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" :value="item.F_CabinID" id="F_CabinID" placeholder="舱室">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                加压时间
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" :value="item.F_jiayaTime" id="F_jiayaTime" placeholder="加压时间">
                            </div>
                        </div>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                稳压时间
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" :value="item.F_wenyaTime" id="F_wenyaTime" placeholder="稳压时间">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                减压时间
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" :value="item.F_jianyaTime" id="F_jianyaTime" placeholder="减压时间">
                            </div>
                        </div>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                出舱时间:
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" :value="item.F_chucangTime" id="F_chucangTime" placeholder="稳压时间">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                开舱次数
                            </div>
                            <div class="aui-list-item-input">
                                <input type="number" :value="item.F_kaicangshu" id="F_kaicangshu" placeholder="开舱次数">
                            </div>
                        </div>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                进舱人数
                            </div>
                            <div class="aui-list-item-input">
                                <input type="number" :value="item.F_rencount" id="F_rencount" placeholder="进舱次数">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                新病人数
                            </div>
                            <div class="aui-list-item-input">
                                <input type="number" :value="item.F_newrencount" id="F_newrencount" placeholder="新病人数">
                            </div>
                        </div>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                操舱方式
                            </div>
                            <div class="aui-list-item-input">
                                <select id="F_way" v-if="item.F_way === '电脑'">
                                    <option value="电脑">电脑</option>
                                    <option value="手动">手动</option>
                                    <option value="电子">电子</option>
                                </select>
                                <select id="F_way" v-else-if="item.F_way === '手动'">
                                    <option value="手动">手动</option>
                                    <option value="电脑">电脑</option>
                                    <option value="电子">电子</option>
                                </select>
                                <select id="F_way" v-else-if="item.F_way === '电子'">
                                    <option value="电子">电子</option>
                                    <option value="手动">手动</option>
                                    <option value="电脑">电脑</option>
                                </select>
                                <select id="F_way" v-else>
                                    <option value="电脑">电脑</option>
                                    <option value="电子">电子</option>
                                    <option value="手动">手动</option>
                                </select>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                单独开舱
                            </div>
                            <div class="aui-list-item-input">
                                <select id="F_danduKaicang" v-if="item.F_danduKaicang === '0'">
                                    <option value="0">否</option>
                                    <option value="1">是</option>
                                </select>
                                <select id="F_danduKaicang" v-else-if="item.F_danduKaicang === '1'">
                                    <option value="1">是</option>
                                    <option value="0">否</option>
                                </select>
                                <select id="F_danduKaicang" v-else>
                                    <option value="0">否</option>
                                    <option value="1">是</option>
                                </select>
                            </div>
                        </div>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                舱内抢救
                            </div>
                            <div class="aui-list-item-input">
                                <select id="F_cangneiQiangjiu" v-if="item.F_cangneiQiangjiu === '否'">
                                    <option value="0">否</option>
                                    <option value="1">是</option>
                                </select>
                                <select id="F_cangneiQiangjiu" v-else-if="item.F_cangneiQiangjiu === '是'">
                                    <option value="1">是</option>
                                    <option value="0">否</option>
                                </select>
                                <select id="F_cangneiQiangjiu" v-else>
                                    <option value="0">否</option>
                                    <option value="1">是</option>
                                </select>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                吸氧方案1
                            </div>
                            <div class="aui-list-item-input">
                                <select id="F_xiyangfa1">
                                    <template v-for="(Dictionary, index) in DictionaryLibrary">
                                        <option v-if="Dictionary.Dictionaries_ID == item.F_xiyangfa1"
                                            :value="Dictionary.Dictionaries_ID">{{Dictionary.Dictionaries_Name}}
                                        </option>
                                    </template>
                                    <template v-for="(Dictionary, index) in DictionaryLibrary">
                                        <option v-if="Dictionary.Dictionaries_ID != item.F_xiyangfa1"
                                            :value="Dictionary.Dictionaries_ID">{{Dictionary.Dictionaries_Name}}
                                        </option>
                                    </template>
                                </select>
                            </div>
                        </div>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                吸氧方案2
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" :value="item.F_xiyangfa2" id="F_xiyangfa2" placeholder="吸氧方案2">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                治疗总时程
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" :value="item.F_shicheng" id="F_shicheng"
                                    placeholder="治疗总时程"><span>min</span>
                            </div>
                        </div>
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                第一次吸氧末
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" :value="item.F_xiyang1" id="F_xiyang1"
                                    placeholder="第一次吸氧末"><span>%</span>
                            </div>
                        </div>

                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                第二次吸氧末
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" :value="item.F_xiyang2" id="F_xiyang2"
                                    placeholder="第二次吸氧末"><span>%</span>
                            </div>
                        </div>
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                第三次吸氧末
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" :value="item.F_xiyang3" id="F_xiyang3"
                                    placeholder="第三次吸氧末"><span>%</span>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                减压末
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" :value="item.F_jianyamo" id="F_jianyamo"
                                    placeholder="减压末"><span>%</span>
                            </div>
                        </div>
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                加压前
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" :value="item.F_jiayawendu" id="F_jiayawendu"
                                    placeholder="加压前"><span>°C</span>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                稳压始
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" :value="item.F_wenyawendu" id="F_wenyawendu"
                                    placeholder="稳压始"><span>°C</span>
                            </div>
                        </div>
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                减压始
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" :value="item.F_jianyawendu" id="F_jianyawendu"
                                    placeholder="减压始"><span>°C</span>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                减压末温度
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <input type="number" :value="item.F_jianmowendu" id="F_jianmowendu"
                                    placeholder="减压末"><span>°C</span>
                            </div>
                        </div>
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                技师
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <select id="F_jsName">
                                    <template v-for="(F_jsName, index) in Query_UserList"
                                        v-if="F_jsName.Permissions_Name == '技师'">
                                        <option v-if="F_jsName.User_Name === item.F_jsName" :value="F_jsName.User_Name">
                                            {{F_jsName.User_Name}}</option>
                                    </template>
                                    <template v-for="(F_jsName, index) in Query_UserList"
                                        v-if="F_jsName.Permissions_Name == '技师'">
                                        <option v-if="F_jsName.User_Name !== item.F_jsName" :value="F_jsName.User_Name">
                                            {{F_jsName.User_Name}}</option>
                                    </template>
                                </select>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                医师
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <select id="F_ysName">
                                    <template v-for="(F_ysName, index) in Query_UserList"
                                        v-if="F_ysName.Permissions_Name == '医师'">
                                        <option v-if="F_ysName.User_Name === item.F_ysName" :value="F_ysName.User_Name">
                                            {{F_ysName.User_Name}}</option>
                                    </template>
                                    <template v-for="(F_ysName, index) in Query_UserList"
                                        v-if="F_ysName.Permissions_Name == '医师'">
                                        <option v-if="F_ysName.User_Name !== item.F_ysName" :value="F_ysName.User_Name">
                                            {{F_ysName.User_Name}}</option>
                                    </template>
                                </select>
                            </div>
                        </div>
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                护士
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <select id="F_hsName">
                                    <template v-for="(F_hsName, index) in Query_UserList"
                                        v-if="F_hsName.Permissions_Name == '护理'">
                                        <option v-if="F_hsName.User_Name === item.F_hsName" :value="F_hsName.User_Name">
                                            {{F_hsName.User_Name}}</option>
                                    </template>
                                    <template v-for="(F_hsName, index) in Query_UserList"
                                        v-if="F_hsName.Permissions_Name == '护理'">
                                        <option v-if="F_hsName.User_Name !== item.F_hsName" :value="F_hsName.User_Name">
                                            {{F_hsName.User_Name}}</option>
                                    </template>
                                </select>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                操舱者1
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <select id="F_ccName1">
                                    <template v-for="(F_ccName1, index) in Query_UserList">
                                        <option v-if="F_ccName1.User_Name === item.F_ccName1"
                                            :value="F_ccName1.User_Name">{{F_ccName1.User_Name}}</option>
                                    </template>
                                    <template v-for="(F_ccName1, index) in Query_UserList">
                                        <option v-if="F_ccName1.User_Name !== item.F_ccName1"
                                            :value="F_ccName1.User_Name">{{F_ccName1.User_Name}}</option>
                                    </template>
                                </select>
                            </div>
                        </div>
                        <div class="aui-list-item-inner" style="justify-content: flex-start;">
                            <div class="aui-list-item-label" style="width: 130px !important;">
                                操舱者2
                            </div>
                            <div class="aui-list-item-input aui-list-item-input-small">
                                <select id="F_ccName2">
                                    <template v-for="(F_ccName2, index) in Query_UserList">
                                        <option v-if="F_ccName2.User_Name === item.F_ccName2"
                                            :value="F_ccName2.User_Name">{{F_ccName2.User_Name}}</option>
                                    </template>
                                    <template v-for="(F_ccName2, index) in Query_UserList">
                                        <option v-if="F_ccName2.User_Name !== item.F_ccName2"
                                            :value="F_ccName2.User_Name">{{F_ccName2.User_Name}}</option>
                                    </template>
                                </select>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-label-width">
                                开舱前设备巡查情况（技师）
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <label><input class="aui-radio" type="radio" value="xuncha1" name="xuncha" v-model="checked">是</label>
                            <label><input class="aui-radio" type="radio" value="xuncha2" name="xuncha" v-model="checked">否</label> -->
                                <input type="checkbox" class="aui-switch" :value="item.F_shebeiCheck" id="F_shebeiCheck"
                                    name="F_shebeiCheck" v-model="checked">
                            </div>
                        </div>
                    </li>
                    <div v-if="checked">
                        <div class="aui-content aui-margin-b-15">
                            <ul class="aui-list aui-form-list">
                                <li class="aui-list-item">
                                    <div class="aui-list-item-inner">
                                        <div class="aui-list-item-input">
                                            <label>
                                                <input type="checkbox" class="aui-checkbox"
                                                    checked>应急呼叫、对讲系统情况良好</label>
                                        </div>
                                    </div>
                                </li>
                                <li class="aui-list-item">
                                    <div class="aui-list-item-inner">
                                        <div class="aui-list-item-input">
                                            <label>
                                                <input type="checkbox" class="aui-checkbox"
                                                    checked>巡视查看本舱次患者是否需处置</label>
                                        </div>
                                    </div>
                                </li>
                                <li class="aui-list-item">
                                    <div class="aui-list-item-inner">
                                        <div class="aui-list-item-input">
                                            <label>
                                                <input type="checkbox" class="aui-checkbox"
                                                    checked>检查是否携带酒精等易燃易爆物品</label>
                                        </div>
                                    </div>
                                </li>
                                <li class="aui-list-item">
                                    <div class="aui-list-item-inner">
                                        <div class="aui-list-item-input">
                                            <label>
                                                <input type="checkbox" class="aui-checkbox"
                                                    checked>核查病人医嘱是否与本舱次压力时程一致</label>
                                        </div>
                                    </div>
                                </li>
                                <li class="aui-list-item">
                                    <div class="aui-list-item-inner">
                                        <div class="aui-list-item-input">
                                            <label>
                                                <input type="checkbox" class="aui-checkbox"
                                                    checked>检查是否携带打火机、手机、电动玩具等物品</label>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-label-width">
                                开舱前安全宣教（护士）
                            </div>
                            <div class="aui-list-item-input">
                                <template v-if="item.F_xuanjiaoPaient === '1'">
                                    <label><input class="aui-radio" type="radio" value="1" name="F_xuanjiaoPaient"
                                            checked>是</label>
                                    <label><input class="aui-radio" type="radio" value="0"
                                            name="F_xuanjiaoPaient">否</label>
                                </template>
                                <template v-if="item.F_xuanjiaoPaient === '0'">
                                    <label><input class="aui-radio" type="radio" value="1"
                                            name="F_xuanjiaoPaient">是</label>
                                    <label><input class="aui-radio" type="radio" value="0" name="F_xuanjiaoPaient"
                                            checked>否</label>
                                </template>
                                <template else>
                                    <label><input class="aui-radio" type="radio" value="1" name="F_xuanjiaoPaient"
                                            checked>是</label>
                                    <label><input class="aui-radio" type="radio" value="0"
                                            name="F_xuanjiaoPaient">否</label>
                                </template>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-label-width">
                                开舱前巡诊交接患者（医师）
                            </div>
                            <div class="aui-list-item-input">
                                <label><input class="aui-radio" type="radio" value="1" checked>是</label>
                                <label><input class="aui-radio" type="radio" value="0">否</label>
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-label aui-list-item-label-width">
                            氧舱浓度标签上传
                        </div>
                        <div class="aui-content-padded aui-list-item-input">
                            <div class="aui-list-item-input" style="margin:15px;" onclick="showAction();">
                                <img v-bind:src="item.F_biaoqian_img" id="avatar" name="avatar" width="200px;">
                                <input type="text" id="F_biaoqian_img" style="display:none">
                            </div>
                        </div>
                    </li>
                </ul>
                <div class="textarea-container">
                    <div>备注</div>
                    <div contenteditable="true" class="textarea-wrapper" id="F_beizhu">
                        {{item.F_beizhu}}
                    </div>
                </div>
            </div>
            <div class="submit-btn-bottom">
                <button onclick="Update_OperatingRecord_Show()">修改</button>
            </div>
        </div>
    </main>
</body>

</html>

<script src="../script/api.js" charset="utf-8"></script>
<script src="../script/vue.js" charset="utf-8"></script>
<script src="../js/ToConfigure.js" charset="utf-8"></script>
<script src="../script/aui-toast.js" charset="utf-8"></script>
<script src="../script/aui-dialog.js" charset="utf-8"></script>
<script type="text/javascript">
    var vm;
    var IdList = [];
    var F_InpatientList = [];
    var list = new Array();
    apiready = function () {
        vm = new Vue({
            el: '#app',
            data: {
                checked: false,
                Url_IP: "",
                Query_UserList: [], //舱室操舱人员信息
                OperatinRecord: [], //舱次信息
                SelectDay_InspectRecord: [],//技师当天巡检讯息
                SelectDay_DoctorCheck: [],//医师当天核查信息
                DictionaryLibrary: [],
                F_Id: 0,
                ParameterIdentification: 0, //0为修改   1为添加
            },
            created() {

                //获取舱室Id
                this.F_Id = api.pageParam.F_id;
                //获取所属医院IP地址
                this.Url_IP = ToConfigure_IP("Gorgeous");
                //获取舱内人员信息
                api.ajax({
                    url: this.Url_IP + 'HyperbaricOxygen/CabinTreatment/Flat_Query_HO_HatchLocation',
                    method: 'POST',
                    data: {
                        values: {
                            ID: this.F_Id
                        }
                    }
                }, function (ret, err) {
                    for (let o = 0; o < ret.length; o++) {
                        if (ret[o].F_InpatientSerialNumber != '') {
                            if (F_InpatientList.length > 0) {
                                F_InpatientList.push(ret[o].F_InpatientSerialNumber);
                                IdList.push(ret[o].F_reserveid);
                            } else {
                                F_InpatientList.push(ret[o].F_InpatientSerialNumber);
                                IdList.push(ret[o].F_reserveid);
                            }
                        }
                    }
                    if (F_InpatientList.length > 0) {
                        let Length = F_InpatientList.length
                        let i = 0;
                        while (i < Length) {
                            RegCloseLoopDataInfo(i);
                            i++;
                        }
                    }
                });
                api.ajax({
                    url: this.Url_IP + 'EquipmentInspect/HO_InspectRecord/SelectDay_InspectRecord',
                    method: 'POST',
                    data: {
                        values: {}
                    }
                }, function (ret, err) {
                    if (ret) {
                        //当天巡检实体
                        vm.SelectDay_InspectRecord = ret;
                    } else {
                        var toast = new auiToast();
                        toast.fail({
                            title: "技师人员未巡检，暂不可开舱",
                            duration: 2000
                        });
                    }
                });

                api.ajax({
                    url: this.Url_IP + 'HyperbaricOxygen/CabinTreatment/SelectDay_DoctorCheck',
                    method: 'POST',
                    data: {
                        values: {
                            CabinId: api.pageParam.F_id
                        }
                    }
                }, function (ret, err) {
                    if (ret) {
                        if (ret[0].F_CabinState == 1) {
                            //当天巡检实体
                            vm.SelectDay_DoctorCheck = ret;
                        }
                        else {
                            var toast = new auiToast();
                            toast.fail({
                                title: "医护人员核查未通过，暂不可开舱",
                                duration: 2000
                            });
                        }
                    } else {
                        var toast = new auiToast();
                        toast.fail({
                            title: "医护人员未核查，暂不可开舱",
                            duration: 2000
                        });
                    }
                });

                api.ajax({
                    url: this.Url_IP + 'HyperbaricOxygen/CabinTreatment/Query_DictionaryLibrary_PB',
                    method: 'get',
                    data: {
                        values: {}
                    }
                }, function (ret, err) {
                    if (ret) {
                        //吸氧方案实体类
                        vm.DictionaryLibrary = ret;
                    } else {
                        var toast = new auiToast();
                        toast.fail({
                            title: "暂无找到吸氧方案",
                            duration: 2000
                        });
                    }
                });


                //获取操作人员信息
                api.ajax({
                    url: this.Url_IP + 'HyperbaricOxygen/CabinTreatment/Query_UserList',
                    method: 'get',
                    data: {
                        values: {}
                    }
                }, function (ret, err) {
                    if (ret) {
                        //舱室操舱人员信息
                        vm.Query_UserList = ret;
                    } else {
                        var toast = new auiToast();
                        toast.fail({
                            title: "暂无舱次信息",
                            duration: 2000
                        });
                    }
                });

                //判断是否获取到舱室Id
                if (this.F_Id !== "0") {

                    api.ajax({
                        url: this.Url_IP + 'HyperbaricOxygen/CabinTreatment/IS_OperatinRecord_PB',
                        method: 'post',
                        data: {
                            values: {
                                F_ID: api.pageParam.F_id
                            }
                        }
                    }, function (ret, err) {
                        if (ret) {
                            vm.OperatinRecord = ret;
                        } else {
                            //记录修改添加
                            vm.ParameterIdentification = 1;
                            api.ajax({
                                url: vm.Url_IP + 'HyperbaricOxygen/CabinTreatment/Query_OperatinRecord_PB',
                                method: 'post',
                                data: {
                                    values: {
                                        F_ID: api.pageParam.F_id
                                    }
                                }
                            }, function (ret, err) {
                                if (ret) {
                                    //舱次编号
                                    document.getElementById("F_cangcid").value = ret[0].F_id;
                                    //压力
                                    document.getElementById("F_yali").value = ret[0].F_yali;
                                    //舱室Id
                                    document.getElementById("F_CabinID").value = ret[0].F_Cabin_ID;
                                    //加压时间
                                    document.getElementById("F_jiayaTime").value = ret[0].F_jiayaTime;
                                    //减压时间
                                    document.getElementById("F_jianyaTime").value = ret[0].F_jianyaTime;
                                    //稳压时间
                                    document.getElementById("F_wenyaTime").value = ret[0].F_wenyaTime;
                                    //出舱时间
                                    document.getElementById("F_chucangTime").value = ret[0].F_chucangTime;
                                    //治疗时呈
                                    document.getElementById("F_shicheng").value = ret[0].F_shicheng;
                                    //进舱人数   总人数
                                    document.getElementById("F_rencount").value = ret[0].zongCount;
                                    //开舱次数
                                    document.getElementById("F_kaicangshu").value = ret[0].kcsl;

                                } else {
                                    var toast = new auiToast();
                                    toast.fail({
                                        title: "暂无舱次相关信息",
                                        duration: 2000
                                    });
                                }
                            });
                        }
                    });
                }
            },
            watch: {
                checked: function (data) { }
            },
            methods: {

            }
        });
    }
    /**
     * 闭环接口
     * */
    function RegCloseLoopDataInfo(i) {
        // //患者id
        const F_reserveId = IdList;
        // //住院流水号
        json = new Object();
        /* *
         * 根据流水号获取医嘱编码*/
        api.ajax({
            url: "http://10.11.3.145:9000/api/CloseLoop/GetOxygenOrderList?visitId=" + F_InpatientList[i],
            type: "get",
            async: false,

        }, function (ret, err) {
            var ClinicalId = ret;
            /*判断返回临嘱数量是否为单条*/
            if (ClinicalId.data.length == 1) {
                /*判断单条医嘱为临嘱还是长嘱*/
                if (ClinicalId.data[0].OrderType == '0') {
                    //*****************************************************************************************************当只有一条医嘱并且为临嘱时
                    /*当为临嘱时直接返回临嘱ID*/
                    json.ZY = F_reserveId[i]; json.OR = ClinicalId.data[0].Id;
                    list.push(json);
                } else {
                    //*****************************************************************************************************当只有一条医嘱并且为长嘱时
                    /*当为长嘱时调用执行档文档查询患者长嘱*/
                    api.ajax({
                        url: "http://10.11.3.145:9000/api/CloseLoop/GetLongTermOrderUndrugExecList?orderId=" + ClinicalId.data[0].data.Id + "&visitId=" + F_InpatientList[i],
                        type: "get",
                        async: false,
                    }, function (ret, err) {
                        //*****************************************************************************************************查询长嘱
                        var LongAdviceId = ret;
                        //判断该患者是否只存在一条长嘱
                        //*****************************************************************************************************判断是否为一条长嘱
                        if (LongAdviceId.data.length == 1) {
                            json.ZY = F_reserveId[i]; json.OR = LongAdviceId.data[0].ExecId;
                            list.push(json);
                        } else {
                            //*****************************************************************************************************如果为多条长嘱
                            //定义入参
                            var idList = LongAdviceId.data.map(obj => obj.ExecId).join(',');
                            //*****************************************************************************************************将查询出的长嘱去匹配是否执行过
                            api.ajax({
                                url: this.Url_IP + "/HyperbaricOxygen/CabinTreatment/obtainOrderId",
                                type: "POST",
                                data: {
                                    values: {
                                        idList: idList, F_reserveId: F_reserveId[i]
                                    }
                                },
                                async: false,
                            }, function (ret, err) {
                                //*****************************************************************************************************
                                //晒出所有已执行过的医嘱ID
                                if (ret != "") {
                                    let data1 = JSON.parse(ret);
                                    //*****************************************************************************************************筛出所有已执行过的长嘱
                                    let filteredArr1 = LongAdviceId.data.filter(x => !data1.some(y => x.ExecId === y.F_orderId));
                                    if (filteredArr1.length == 1) {
                                        json.ZY = F_reserveId[i]; json.OR = filteredArr1[0].ExecId;
                                        list.push(json);
                                    } else {
                                        json.ZY = F_reserveId[i]; json.OR = filteredArr1[filteredArr1.length - 1].ExecId;
                                        list.push(json);
                                    }
                                } else {
                                    json.ZY = F_reserveId[i]; json.OR = LongAdviceId.data[LongAdviceId.data.length - 1].ExecId;
                                    list.push(json);
                                }
                            }
                            )
                        }
                    })
                }
            } else {
                //*****************************************************************************************************当临嘱为多条时
                var idList = ClinicalId.data.map(obj => obj.Id).join(',');
                //*****************************************************************************************************将多条临嘱是匹配哪些是执行过的
                OrderId(i, idList, F_reserveId, ClinicalId);
            }
        })
    }
    function OrderId(i, idList, F_reserveId, ClinicalId) {
        let json = new Object();
        api.ajax({
            url: this.Url_IP + "/HyperbaricOxygen/CabinTreatment/obtainOrderId",
            type: "POST",
            async: false,
            data: {
                values: {
                    idList: idList,
                    F_reserveId: F_reserveId[i]
                }
            },
        }, function (ret) {
            if (ret != "") {
                let data = JSON.parse(ret);
                //*****************************************************************************************************筛选未执行的临嘱数据
                //晒出所有已执行过的医嘱ID
                const filteredArr1 = ClinicalId.data.filter(x => !data.some(y => x.Id === y.F_orderId));
                if (filteredArr1.length == 0) {
                    if (ClinicalId.data[0].OrderType == '1') {
                        //*****************************************************************************************************查询出的所有临嘱均以为被执行过就去拿到最新的临嘱执行获取长嘱接口
                        api.ajax({
                            url: "http://10.11.3.145:9000/api/CloseLoop/GetLongTermOrderUndrugExecList?orderId=" + ClinicalId.data[0].Id + "&visitId=" + F_InpatientList[i],
                            type: "get",
                            async: false,
                        }, function (ret, err) {
                            var LongAdviceTwoId = ret;
                            //*****************************************************************************************************判断返回长嘱是否为一条
                            api.ajax({
                                url: this.Url_IP + "/HyperbaricOxygen/CabinTreatment/obtainOrderId",
                                type: "POST",
                                data: {
                                    values: {
                                        idList: LongAdviceTwoId.data.map(item => item.ExecId).join(','),
                                        F_reserveId: F_reserveId[i]
                                    }
                                },
                                async: false,
                            }, function (ret, err) {
                                if (ret != "") {
                                    let data2 = JSON.parse(ret);
                                    //*****************************************************************************************************筛出所有已执行过的长嘱
                                    let filteredArr2 = LongAdviceTwoId.data.filter(x => !data2.some(y => x.ExecId === y.F_orderId));
                                    if (filteredArr2.length == 1) {
                                        json.ZY = F_reserveId[i]; json.OR = filteredArr2[0].ExecId;
                                        list.push(json);
                                    } else {
                                        json.ZY = F_reserveId[i]; json.OR = filteredArr2[filteredArr2.length - 1].ExecId;
                                        list.push(json);
                                    }
                                } else {
                                    json.ZY = F_reserveId[i]; json.OR = LongAdviceTwoId.data[LongAdviceTwoId.data.length - 1].ExecId;
                                    list.push(json);
                                }
                            })
                        })
                    } else {
                        json.ZY = F_reserveId[i]; json.OR = LongAdviceTwoId.data[LongAdviceTwoId.data.length - 1].ExecId;
                        list.push(json);
                    }

                } else if (filteredArr1.length == 1) {
                    //*****************************************************************************************************如果只有一条；
                    json.ZY = F_reserveId[i]; json.OR = filteredArr1[0].Id;
                    list.push(json);
                } else {
                    //*****************************************************************************************************当有多条为执行的临嘱返回第一次开放的一条
                    json.ZY = F_reserveId[i]; json.OR = filteredArr1[filteredArr1.length - 1].Id;
                    list.push(json);
                }
            } else {
                json.ZY = F_reserveId[i];
                json.OR = ClinicalId.data[ClinicalId.data.length - 1].Id;
                list.push(json);
            }
        })
    }
    //修改舱次信息
    function Update_OperatingRecord_Show() {
        //获取所属医院IP地址
        var Url_IP = ToConfigure_IP("Gorgeous");
        //获取参数
        var JsonStr = GetParameters();

        api.ajax({
            url: Url_IP + 'HyperbaricOxygen/CabinTreatment/Update_OperatingRecord_Show',
            method: 'post',
            dataType: 'String',
            data: {
                values: {
                    parms: JsonStr
                }
            }
        }, function (ret, err) {
            var toast = new auiToast();
            if (ret == "True") {
                JumpPage();
            } else {
                toast.fail({
                    title: "提交失败",
                    duration: 2000
                });
            }
        });
    }



    //添加操舱执行
    function Add_OperatingRecord_Show() {
        document.getElementById("Preservatio").setAttribute("disabled", "true");
        //获取所属医院IP地址
        var Url_IP = ToConfigure_IP("Gorgeous");
        //获取参数
        var JsonStr = GetParameters();
        api.ajax({
            url: Url_IP + 'HyperbaricOxygen/CabinTreatment/Add_OperatingRecord_Show',
            method: 'post',
            dataType: 'String',
            data: {
                values: {
                    parms: JsonStr,
                    map: JSON.stringify(list)
                }
            }
        }, function (ret, err) {
            var toast = new auiToast();
            if (ret == "True") {
                api.closeWin();
            } else {
                toast.fail({
                    title: "提交失败",
                    duration: 2000
                });
            }
        });
    }

    function Update_CabinInformation(RemindInspect) {
        var Query_JsParms = new Object();
        Query_JsParms.F_id = api.pageParam.F_id;
        Query_JsParms.F_RemindInspect = RemindInspect;
        var JsonStr = JSON.stringify(Query_JsParms);
        var Url_IP = ToConfigure_IP("Gorgeous");
        api.ajax({
            url: Url_IP + 'HyperbaricOxygen/CabinTreatment/Update_HO_CabinInformation_Android',
            method: 'POST',
            data: {
                values: {
                    parms: JsonStr
                }
            },
            dataType: 'String',
        }, function (ret, err) {
            var toast = new auiToast();
            if (ret == "True") {
                toast.success({
                    title: "已发送提醒请求",
                    duration: 2000
                });
            } else {
                toast.fail({
                    title: "发送提醒请求失败",
                    duration: 2000
                });
            }
        });
    }


    function showAction() {
        api.actionSheet({
            title: '上传氧舱浓度标签',
            cancelTitle: '取消',
            buttons: ['拍照']
        }, function (ret, err) {
            if (ret) {
                getPicture(ret.buttonIndex);
            }
        });
    }

    function getPicture(sourceType) {
        if (sourceType == 1) { // 拍照
            //获取一张图片
            api.getPicture({
                sourceType: 'camera',
                encodingType: 'png',
                mediaValue: 'pic',
                allowEdit: false,
                quality: 90,
                saveToPhotoAlbum: true
            }, function (ret, err) {
                // 获取拍照数据并处理
                if (ret) {
                    var imgSrc = ret.data;
                    if (imgSrc != "") {
                        document.getElementById("F_biaoqian_img").value = imgSrc;
                        var ele = $api.dom('#avatar');
                        $api.attr(ele, 'src', imgSrc);
                    }
                }
            });
        }
    }

    function GetParameters() {
        var JsParms = new Object();
        JsParms.F_State = "完成";
        //舱室Id
        JsParms.F_CabinID = api.pageParam.F_Cabin_ID;
        //修改唯一标识
        JsParms.F_cangcid = document.getElementById("F_cangcid").value;
        //修改唯一标识
        JsParms.F_Id = document.getElementById("HoldInformation_Id").value;
        //操舱方式
        JsParms.F_way = document.getElementById("F_way").value;
        //技师姓名
        JsParms.F_jsName = document.getElementById("F_jsName").value;
        //医师姓名
        JsParms.F_ysName = document.getElementById("F_ysName").value;
        //护士姓名
        JsParms.F_hsName = document.getElementById("F_hsName").value;
        //操舱者姓名1
        JsParms.F_ccName1 = document.getElementById("F_ccName1").value;
        //操舱者姓名2
        JsParms.F_ccName2 = document.getElementById("F_ccName2").value;
        //操舱者姓名2
        JsParms.F_ccName2 = document.getElementById("F_ccName2").value;
        //单独开仓
        JsParms.F_danduKaicang = document.getElementById("F_danduKaicang").value;
        //舱内抢救
        JsParms.F_cangneiQiangjiu = document.getElementById("F_cangneiQiangjiu").value;
        //治疗巡查设备情况
        JsParms.F_shebeiCheck = $api.val($api.dom("input[name='F_shebeiCheck']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.F_shebeiCheck === '') {
            JsParms.F_shebeiCheck = "0";
        }
        //宣教巡查患者
        JsParms.F_xunPaient = $api.val($api.dom("input[name='F_xunPaient']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.F_xunPaient === '') {
            JsParms.F_xunPaient = "0";
        }

        //宣教巡查患者
        JsParms.F_xuanjiaoPaient = $api.val($api.dom("input[name='F_xuanjiaoPaient']:checked"));
        //如果数据为空时  数据为0
        if (JsParms.F_xuanjiaoPaient === '') {
            JsParms.F_xuanjiaoPaient = "0";
        }
        //开舱次数
        JsParms.F_kaicangshu = document.getElementById("F_kaicangshu").value;
        //压力
        JsParms.F_yali = document.getElementById("F_yali").value;
        //开舱次数
        JsParms.F_kaicangshu = document.getElementById("F_kaicangshu").value;
        //进仓人数
        JsParms.F_rencount = document.getElementById("F_rencount").value;
        //新病人数
        JsParms.F_newrencount = document.getElementById("F_newrencount").value;
        //第一次吸氧末
        JsParms.F_xiyang1 = document.getElementById("F_xiyang1").value;
        //第二次吸氧末
        JsParms.F_xiyang2 = document.getElementById("F_xiyang2").value;
        //第三次吸氧末
        JsParms.F_xiyang3 = document.getElementById("F_xiyang3").value;
        //减压末
        JsParms.F_jianyamo = document.getElementById("F_jianyamo").value;
        //加压前温度
        JsParms.F_jiayawendu = document.getElementById("F_jiayawendu").value;
        //稳压始温度
        JsParms.F_wenyawendu = document.getElementById("F_wenyawendu").value;
        //减压始温度
        JsParms.F_jianyawendu = document.getElementById("F_jianyawendu").value;
        //减压末温度
        JsParms.F_jianmowendu = document.getElementById("F_jianmowendu").value;
        //吸氧方案1
        JsParms.F_xiyangfa1 = document.getElementById("F_xiyangfa1").value;
        //吸氧方案2
        JsParms.F_xiyangfa2 = document.getElementById("F_xiyangfa2").value;
        //治疗时程
        JsParms.F_shicheng = document.getElementById("F_shicheng").value;
        //加压时间
        JsParms.F_jiayaTime = document.getElementById("F_jiayaTime").value;
        //稳压时间
        JsParms.F_wenyaTime = document.getElementById("F_wenyaTime").value;
        //减压时间
        JsParms.F_jianyaTime = document.getElementById("F_jianyaTime").value;
        //出舱时间
        JsParms.F_chucangTime = document.getElementById("F_chucangTime").value;
        //备注
        JsParms.F_beizhu = document.getElementById("F_beizhu").innerHTML;
        //氧浓度标签`
        JsParms.F_biaoqian_img = document.getElementById("F_biaoqian_img").value;
        //获取用户ID
        if (Get_User_Id() == undefined) {
            JsParms.F_CreatorUserId = "1088";
        } else {
            JsParms.F_CreatorUserId = Get_User_Id();
        }
        return JSON.stringify(JsParms);
    }
    //获取用户ID
    function Get_User_Id() {
        //api.getPrefs获取当前登录状态
        api.getPrefs({
            key: 'User_Id'
        }, function (ret, err) {
            //当偏好设置尚未设置或者曾设置后被移除后，返回值(ret.value)均为空。
            var val = ret.value;
            if (val != "") {
                return val;
            } else {
                //未登录
                return "";
            }
        });
    }


    //跳转页面
    function JumpPage() {
        var dialog = new auiDialog();
        dialog.alert({
            title: "提示",
            msg: '操作成功，是否跳转舱次信息',
            buttons: ['取消', '确定']
        }, function (ret) {
            if (ret.buttonIndex === 1) {

            } else if (ret.buttonIndex === 2) {
                api.historyBack({}, function (ret, err) {
                    if (!ret.status) {
                        api.closeWin();
                    }
                });

                api.sendEvent({
                    name: 'cabin',
                    extra: {
                        state: 'no'
                    }
                });
            }
        })
    }

</script>